Skip to content

docs(workspaces): Document --include use case #6789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oskarols
Copy link

@oskarols oskarols commented May 6, 2025

What's the problem this PR addresses?

Hi 👋 I find myself using yarn workspaces -Ap --include quite a lot to target specific packages in a monorepo for commands, e.g. to run yarn add foobar. I think the --include could use a separate example in the workspaces doc since it's so useful. 👍

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@oskarols oskarols force-pushed the docs-workspaces-specific-packages branch from 229e4d1 to 86d3601 Compare May 6, 2025 12:41
@oskarols
Copy link
Author

oskarols commented May 6, 2025

Running yarn version check --interactive doesn't work unfortunately.

ERROR  Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
        1. You might have mismatching versions of React and the renderer (such as React DOM)
        2. You might be breaking the Rules of Hooks
        3. You might have more than one copy of React in the same app
        See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.

 - 1. You might have mismatching versions of React and the renderer (such as React DOM)
 - 2. You might be breaking the Rules of Hooks
 - 3. You might have more than one copy of React in the same app
 - See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
 - resolveDispatcher (packages/plugin-version/node_modules/react/cjs/react.development.js:1476:13)
 - useState (packages/plugin-version/node_modules/react/cjs/react.development.js:1507:20)
 - useReleases (packages/plugin-version/sources/commands/version/check.tsx:208:39)
 - App (packages/plugin-version/sources/commands/version/check.tsx:248:47)
 - renderWithHooks (packages/yarnpkg-libui/node_modules/react-reconciler/cjs/react-reconciler.development.js:6412:18)
 - mountIndeterminateComponent (packages/yarnpkg-libui/node_modules/react-reconciler/cjs/react-reconciler.development.js:9238:13)
 - beginWork (packages/yarnpkg-libui/node_modules/react-reconciler/cjs/react-reconciler.development.js:10476:16)
 - Object.invokeGuardedCallbackProd (packages/yarnpkg-libui/node_modules/react-reconciler/cjs/react-reconciler.development.js:12101:10)
 - invokeGuardedCallback (packages/yarnpkg-libui/node_modules/react-reconciler/cjs/react-reconciler.development.js:12292:31)
 - beginWork$1 (packages/yarnpkg-libui/node_modules/react-reconciler/cjs/react-reconciler.development.js:16531:7)

Using yarn 4.9.1

@clemyan
Copy link
Member

clemyan commented May 9, 2025

Why do you have node_modules directories for the workspaces? That shouldn't happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants